'''
验证操作的常用方法：
(1)driver.title			获取title
(2)driver.find_element(By.ID,’value).text			获取元素的文本
(3)driver.find_element(By.ID,’value).get_attribute(name)	获取元素的属性
(4)driver.current_url		获取url

'''
from selenium import webdriver
from time import sleep
chrome_location = r'D:\chrom browser\chrome-win\chrome.exe'
options = webdriver.ChromeOptions()
options.binary_location = chrome_location
dr = webdriver.Chrome(options=options)
dr.get(r'https://www.baidu.com/')
dr.maximize_window()
sleep(3)
print(dr.title)
print(dr.current_url)